package cn.com.api.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiT_order;
import cn.com.api.entity.ApiT_order_detail;
import cn.com.api.entity.ApiU_coupon;
import cn.com.api.service.base.U_couponServiceBase;

/**
 * 
 */
@Service
public interface ApiU_couponService extends U_couponServiceBase {

  	//新增对象后返回记录ID
    public int U_couponInsertion(ApiU_coupon u_coupon);
    
    //根据查询条件查询优惠券列表结果集
	public List<ApiU_coupon> findU_couponsByCondition(Map<String, Object> param) throws Exception;
	
	//修改优惠券
    public int updateU_coupon_info(ApiU_coupon u_coupon);
    
    //新增优惠券
  	public void insertU_coupon_info(ApiU_coupon u_coupon);
    
    //新增优惠券
	public  List<Object> insertU_coupon_info(ApiU_coupon u_coupon, List<Map<String, Object>> list) throws Exception;

	//修改优惠券
	public void updateU_coupon_info(ApiU_coupon u_coupon,
			List<Map<String, Object>> list, String[] coupon_id_list) throws Exception;
	
	//根据用户ID查询优惠券展示列表
	public List<ApiU_coupon> findU_couponsByUserid(
			Map<String, Object> params) throws Exception;

	public ApiU_coupon findU_couponsDetailByCouponid(
			Map<String, Object> params) throws Exception;
	
	//根据查询条件查询优惠券列表
	public List<ApiU_coupon> findU_coupons_info(
			Map<String, Object> params) throws Exception;

	public Map<String, Object> findU_coupons_buy(
			Map<String, Object> params)throws Exception;

	public void insertU_coupon_order(ApiT_order apiT_order);

	public void insertU_coupon_order_detail(ApiT_order_detail apiT_order_detail);

	public void upd_coupons_status(String coupon_id_list)throws Exception;

	public List<Map<String,Object>> getOrdersList(Map<String, Object> param) throws Exception;
}


